package com.xiangwei.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.xiangwei.entity.Product;
import com.xiangwei.entity.Vendor;

public interface ProductMapper {

	int deleteByPrimaryKey(Integer id);

	int insert(Product record);

	int insertSelective(Product record);

	Product selectByPrimaryKey(Integer id);

	int updateByPrimaryKeySelective(Product record);

	int updateByPrimaryKey(Product record);

	Product getMaxIdProduct();
    
    
    
    Product getProduct(Integer id);
    
    List<Product> getAll(@Param("start")Integer start, @Param("pageSize")Integer pageSize);
    
    List<Product> getProductList(@Param("vId")Integer vId);
    List<Product> getProductLists(@Param("vId")Integer vId);
    Integer getCount();
    
    List<Vendor> selectByVendorName(@Param("vName")String vName);
    
    List<Product> selectProductByVendorName(@Param("vName")String vName);
    
    Product selectByProductName(@Param("pName") String pName, @Param("vId") Integer vId);
    
    int findProductNameCount(Map<Object,Object> map);
    
    Product selectByNameAndVid(Map<Object,Object> map);
    
    int findProductCount(Integer vId);
    
    List<Product> getAllProduct();
}